Umbraco Commerce v13.1.7 ProductAdapterBase not fi...
# help-with-umbraco
j
Hi all, I'm currently creating a custom product adapter to integrate with a PIM system following the Umbraco Commerce Documentation https://docs.umbraco.com/umbraco-commerce/key-concepts/product-adapters However, the documentation is out of date as IProductAdapter is obsolete and ProductAdapterBase is now the preferred method. The issue I'm having is with ProductAdapterBase registered with my custom adapter it's not firing when adding a product to basket resulting in the exception: ArgumentNullException: Value cannot be null. (Parameter 'productSnapshot') Out of interest I changed it to inherit from the obsolete IProductAdapter and this did fire and more interestingly the ProductAdapterBase also inherits from IProductAdapter? I'm a bit confused where I'm going wrong as everything looks correct in my code as per the examples? Any help would be greatly appriciated! Many thanks, Jonny
m
I think the docs might be slightly wrong in that you should register it via AddUnique(). We still use IProductAdapter internally, it’s just better to extend from ProductAdapterBase as it has some default implementations of the interface for when you don’t need to implement everything.
j
That’s great @Matt Brailsford thanks! I’ll check it out tomorrow and see if it sorts my issue
Hi Matt, I can confirm that's resolved my issue thanks again!
2 Views